<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('来电记录草稿列表')"/>
</head>
<style>
    .listWaitTab{
        background-color: #ffffff;
        border-radius:6px 6px 0px 0px;
        margin-top: 10px;
        border-bottom: 1px solid #C2C2C3;
    }
    .select-tableb{
        border-radius:0px 0px 6px 6px;
        margin-top: 0px;
        /*box-shadow: 1px 1px 0px rgb(0 0 0 / 20%);*/
    }
</style>
<body class="gray-bg">
<div class="container-div">
    <div class="row">
        <div class="col-sm-12 search-collapse">
            <form id="post-form">
                <div class="select-list">
                    <ul>
                        <li>
                            流水号：<input type="text" name="wsCode"/>
                        </li>
                        <li>
                            来电号码：<input type="text" name="fromTelA"/>
                        </li>
                        <li>
                            来电人：<input type="text" name="fromName"/>
                        </li>
                        <li>
                            地区名称：<input type="text" name="fmAreaName"/>
                        </li>
                        <li>
                            内容分类：<input type="text" name="dcntAname"/>
                        </li>
                        <li>
                            <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
                                    class="fa fa-search"></i>&nbsp;搜索</a>
                            <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
                                    class="fa fa-refresh"></i>&nbsp;重置</a>
                        </li>
                    </ul>
                </div>
            </form>
        </div>

        <div class="btn-group-sm" id="toolbar" role="group">
            <a class="btn btn-success multiple disabled" onclick="$.operate.removeAll('释放待处理来电记录信息')">
                <i class="fa fa-plus"></i> 释放
            </a>
        </div>

        <div class="tab-content">
            <div class="col-sm-12 select-table table-striped tab-pane fade in active select-tableb" id="home">
                <table id="bootstrap-table"></table>
            </div>
        </div>


    </div>
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
    var prefix = ctx + "system/mTelRcd";

    $(function () {
        var options = {
            url: prefix + "/freedListWaitJson",
            removeUrl: prefix + "/removeFreedListWait",
            sortName: "pkId",
            sortOrder: "desc",
            uniqueId: "pkId",
            modalName: "待处理来电记录",
            fixedColumns: true,
            fixedNumber: 1,
            fixedRightNumber: 1,
            columns: [{
                checkbox: true
            },
                {
                    field: "pkId",
                    title: 'id',
                    align: 'left',
                    halign: 'center',
                    visible: false
                },{
                    field: "userName",
                    title: '待处理人',
                    align: 'left',
                    halign: 'center',
                },
                {
                    field: 'wsCode',
                    title: '流水号',
                    align: 'left',
                    halign: 'center',
                    sortable: true
                },
                {
                    field: 'liftTelNo',
                    title: '接听分机',
                    align: 'center'
                },
                {
                    field: 'liftWorker',
                    title: '接听人',
                    align: 'center'
                },
                {
                    field: 'fmAreaName',
                    title: '地区',
                    align: 'center',
                    sortable: true
                },
                {
                    field: 'fromTelA',
                    title: '来电号码',
                    align: 'left',
                    halign: 'center',
                    sortable: true
                },
                {
                    field: 'fromName',
                    title: '来电人',
                    align: 'center',
                    sortable: true
                },{
                    field: 'dfmClaName',
                    title: '诉求类型',
                    align: 'center',
                    sortable: true
                },{
                    field: 'dcntAname',
                    title: '内容分类',
                    align: 'center',
                    sortable: true
                },
                {
                    field: 'fromTime',
                    title: '接听时间',
                    align: 'center',
                    sortable: true
                },
                {
                    field: 'smDate',
                    title: '提交日期',
                    align: 'center'
                },
                {
                    field: 'stateFlag',
                    title: '当前状态',
                    align: 'center',
                    sortable: true,
                    formatter: function (value, row, index) {
                        return fmtTelGetState(value, row, index);
                    }
                },
                {
                    field: 'myDesc',
                    title: '坐席备注',
                    align: 'left',
                    halign: 'center'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function (value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.pkId + '\',\''+ '释放该条'+'\')"><i class="fa fa-edit"></i>释放</a> ');
                        return actions.join('');
                    }
                }]
        };
        $.table.init(options);
    });

</script>
</body>
</html>